/*
 * DatabaseListPanel.java
 *
 * Created on November 28, 2007, 4:44 PM
 */

package dnbW.uiW.dbW;

import javax.swing.table.TableColumn;

/**
 *
 * @author  zhouyong
 */
public class DatabaseListPanel extends javax.swing.JPanel {
    
    /** Creates new form DatabaseListPanel */
    public DatabaseListPanel() {
        initComponents();
        //this.databaseListTable.getColumnModel()
        
        this.databaseListTable.getTableHeader().setReorderingAllowed(false);
        
        TableColumn column = this.databaseListTable.getColumnModel().getColumn(0);
        column.setResizable(false);
        column.setMaxWidth(20);
        
        column = this.databaseListTable.getColumnModel().getColumn(1);
        column.setPreferredWidth(50);
        
    }
    
    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jScrollPane1 = new javax.swing.JScrollPane();
        databaseListTable = new javax.swing.JTable();

        setName("Form"); // NOI18N
        setLayout(new java.awt.BorderLayout());

        jScrollPane1.setName("jScrollPane1"); // NOI18N

        databaseListTable.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {

            },
            new String [] {
                "Mark", "Name", "Creation Date"
            }
        ) {
            Class[] types = new Class [] {
                java.lang.Boolean.class, java.lang.String.class, java.lang.String.class
            };
            boolean[] canEdit = new boolean [] {
                true, false, false
            };

            public Class getColumnClass(int columnIndex) {
                return types [columnIndex];
            }

            public boolean isCellEditable(int rowIndex, int columnIndex) {
                return canEdit [columnIndex];
            }
        });
        databaseListTable.setFillsViewportHeight(true);
        databaseListTable.setName("databaseListTable"); // NOI18N
        jScrollPane1.setViewportView(databaseListTable);

        add(jScrollPane1, java.awt.BorderLayout.CENTER);
    }// </editor-fold>//GEN-END:initComponents
    
    
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JTable databaseListTable;
    private javax.swing.JScrollPane jScrollPane1;
    // End of variables declaration//GEN-END:variables

    public javax.swing.JTable getDatabaseListTable() {
        return databaseListTable;
    }
    
}
